Warning message and error related to copy constructor corrected.