moved canvas.remove() to try-catch block because of errors on some devices