Core: Added missing return statements.

Closes #6841