Restore IFS before return

Thanks to oswaldini for catching this bug