Fixed gapclose bug