fix not_found issue and empty maximum() issue