Not found error handling bugfix