fixed housekeeping problems