added proper error message display