fixed AP compiler bug