Brick generate bug fixed