Adjusted code for Linux build.