further error handling

further error handling