sort coordinates on box.

bounding box would occasionally flip due to wrong order of coordinates
(large before small) happened when drawing from right to left