Code has been fixed. A new savefile will be required but you should not encounter this issue in the future.