fix 'not found' error handling