Fixed some compile time warnings for gcc 4.9.
Fix a small oversight that crashes gcc 4.7, though it is perfectly valid c++11.