Fix missing return in non-void functions