Fix issue with configuration

@srozum 

Fix for deep copy of configuration.