Fix bug that showed white screen on transition between scenes