I'm with @Cups ;, I need a bit more information. Is the same query used for the sizes too? As this just became a lot more complicated, but good news, there is an easy fix if you are "willing" to update your database values.
In short, it is sorting your sizes as if they were a string, not a number. The quickest way to resolve this (if using the same query as the one I posted previously) is to put a 0 in front of the single digit numbers, so they are padded as two digits (4 becomes 04, 5 to 05, etc). This will let it sort it as a string correctly.
If it is a separate query, chances are either the column needs updated in the ORDER BY or the column is of VARCHAR or textual and not numeric, in which case you would need to add leading 0's to get it to sort the string properly, or using the MySQL CAST() function to convert the VARCHAR column to INT