some fixes and additions for the compiler