bug fixes for native platforms