fixed compiler errors at xcode 4.6.1