Changes were made in order to compile under Linux