updated copySelectLayer.js