Fixed c++11 warning better