fixes for copying errors