fixes and compile