fixed problems with 'destroyed' signal