issue with lookup_gap fixed