fixed bug, calling setSize before canvas setup