fix loop overlap range restriction