fixed repetition error in sql script