fixing some issues to enhance the compatibility with Linux