Added unique condition to help clean up json