Add fix for weird reset that would crash malloc.