Fixes transition bug