Fixed a few compiler warnings and compilation on OS X

Hmm.... you are right. They don't make sense )