Maybe we should also return 1 in the case of an exception