Copied new oacom code over (fixes potential crasher)