Solved bug with canvas dimensions