Fixing wrong return types reported by return type hints [ci skip]