Cardio/weights

I've been going to th gym for 2 weeks now. I do between 30 and 40 minutes on the treadmill and then lift. I feel like I am gaining weight though, I eat less then 1500 calories ( don't bother looking at the diary because I haven't put everything in). Is this normal with just starting lifting weights? Or am I doing something wrong?