don't echo query and fix duplicate insert