Fix the bug where a blank error message displayed upon opening the modal