Fixed Linux/OS X compatibility