fix a platform-related bug