Bug Fixes

Fixes several bugs relating to duplicates and displaying errors