cleanup before scene switching