fixed OSX to Linux compatabilities