fixing dynamic object removal problem while switching levels.
remove dead code