How are ye fretting the chord (which fingers on which notes)? You should have the 4th fret notes barred with your first finger and then use your 3rd finger to barre the 5th fret notes. If you can't manage this right now, you could experiment with other fingerings. One thing to keep in mind, beginners tend to put too much hand pressure in fretting notes on the guitar. You want just enough to make the notes ring, yet light enough to facilitate changing shapes/sliding shapes, etc.
Capt. Jones