fix bug in testing page overlap