This is something you will have to negotiate with your lender. Each case is different, each lender is different. Consult an attorney and accountant and get clear answers, in writing, from your lender. In many cases, the answer is yes, however, not always.
There is no cut and dry answer to this one...