Fixes bug with canvas sizing