fixes minor bugs
Enabling clang compilation