Roth ira early withdrawals

I've had my Roth Ira for over 5 years now. I am under 59 1/2 and put in $6500 3 years ago. I took out $1400 early withdrawal for personal reasons and am now being taxed 10%. Is this right??? I thought the rule was if the account was open for more than 5 years I would be allowed to withdraw my contributions without penalty? What am I missing here, am I wrong?