Fixed wierd transition bug