fixed hack so switching between native and custom works correctly