It's not wrong. Normally in English sentences are ordered " Subject (S), Verb (V), Indirect Object (IO), Direct Object (DO) " but can run OSV, and, where pronouns are used in substitution of either the subject or object (e.g. your sentence) there are no word order constraints so...