cleaning up level transitions