fix api mystery crash