Made code compatible with linux