fixes transition bug