Fix crash due to missing return values