solves compilation errors on mac and linux