fixed #1166 with correct copy