My question involves landlord-tenant law in the State of: NY

Hi I recently left an apartment with 4 months left on the lease for a new apartment due to unsatisfactory conditions and what I felt was neglect and a big runaround from my landlord. Though I moved I still opted to pay rent for the apartment till the end of my term on Aug31 2008.

I paid for may and june together and towards the end of june they sent workers into the 3 family home to renovate it as well as my apartment and the 3rd fl apt. They renovations took place till the beginning of august and then I got word from my neighbor that she was moving into my old apartment as of the 15th of Aug. Now here is the thing I cut a check for July and my girlfriend who also lived with me, contacted my apt manager who handles all the landlords affairs to let her know that I have the payment. She told my girlfriend in a phone conversation that we did not have to make payment and that everything was taken care of, when we asked if she was sure she said it was okay and not to worry about it we did not have to pay. We voided the check and returned the money to our account, now when I ? the security deposit in Sept she told me that we could not get it b/c our landlord applied it to July's rent and expects that we pay part of Aug.

Now I want to know is this right and are my rights being violated, I feel that if people were in my apartment renovating it how can I be liable to pay rent in a place that was un occupiable and not accessible to me during this whole time. And if I supplied a check for July why tell me I don't have to pay and then use my security deposit mysteriously when I ask for it back to pay "July's Rent" I contacted the NYC BAR Association and they told me that my security is mines and should not be used to cover rent and if they have an issue with rent that , that claim should go through small claims court.

I just want to know if my feelings are right in that I THINK Im getting shafted and bamboozled?????? I truly don't think that I should be responsible for that , doesn't having people in my previous apt renovating void my responsiblity for it??

Any assistance would be appreciated thank you .