Fixed partitioning when width of canvas mod number of threads != 0