Fix bug with missing return