fix warning "Not all execution paths return a value"