I lived in california for 3 months in 2017. Why am i paying state taxes in my refund?

I lived in California from Aug 2016 to Mar 2017. In 2017 I filed taxes in California and got a return. Now I am filling taxes for Jan 2017 to Mar 2017 from California but now I have to pay taxes back. Why am I paying now when I only lived there three months?