Fixed notfound and added test for it