Fix premature css transitions