Better error handling, fixed an issue in the employeemodel