Added return to some places for consistency.

Related to #2168