improves detection of formatting error