Added in latests fixes for sorting models