Fix build for Tests and Duplicate command