fix bug by making overlap test two sided