fix crashes from crittercism