Update lCanvas.js

Fixed some issues founds while testing