Ensure that layout is set correctly for drawing
Fix crashes
Fix canvas size