Is premium tax credit based on the monthly salary you make for the months you have coverage or for the entire year?

I worked full time and had insurance through my employer from Jan thru Sept.  In October I quit my job and got a part time job to care for my mother and health insurance was not offered by my employer.  I signed up for a plan through the exchange and entered my monthly income and qualified for a subsidy.  But now, when I do my taxes and enter both W2's from the full time and part time job, it calculates that I wouldn't qualify for the amount of subsidy I received so wants me to pay it back for those 3 months I received subsidy.  That doesn't make sense to me.  I lost coverage through my employer and took a huge cut in pay.  That is why I qualified for special enrollment and subsidy in the first place.  Based on the current (supported by paystubs) monthly wages.