Fixes a "not all paths return a value" error.