some fixes to compile