fixed some compiler errors under linux