put in some code to track weird gap bug