fixed bug with compiler
misc fixes