fixed some warnings & errors on Linux