corrected termination condition for fill character introduced in last version