add FIXMEs after running cppcheck
fix bug found by clang's analyzer (dereferencing NULL pointer)