fixes for c++11 (in progress)