fixing menu transition issue