Fixed the bug with error display