-fixed a bug where error borders would remain after the contents were filled for some elements