Fixed rare null pointer exception in saveOptions()