fixed transition logic, and minified js