Fix a couple bad_access bugs