Fix canvas animation