Fixing animation bug and better transition