Minor change to make sql return ordering ascending