updates for Xcode B3
fixed sort for new compiler