Fixes for Ali's crashes