merge and small fix to copy