fix clearline function with ghost and block holding