Fix edge case where error msg doesn't show