fixing clear errors button click