fixed some compiler errors for linux g++