(bugfix) various fixes that prevented compilation