Error handling + shorter and faster canvas coordinates getter.