Fix getter / setter bug with toggleAnimation class