remove else and c++11 warnings