try to fix loopEndBrick Bug