fix crash on import from JS