Modify mydup2