Changing to write out the canvas through JS in order to set the size
properly