Fixed the warnings in copy routines.