minor bugs fix, compiles