Bug Fix and Duplicate Error