fixed bugs to be able to compile, Mike