fix compilation on xcode 6
fix minor bug