fixed some mistakes that prevented compiling