merge in noiphonehere's changes to fix the freeze/crash for the new codes