fixed a bug with copying the dictionaries
(#355)