some compiler errors fixed