Drugmaker Bristol-Myers Squibb has agreed to settle claims that it improperly marketed its antipsychotic drug Abilify by paying out $19.5 million to 42 states.

According to a statement from Pennsylvania Attorney General Bruce Beemer, the accord resolves litigation over allegations that the drugmaker improperly promoted the antipsychotic drug to elderly patients suffering from dementia, even though the drug had only been approved for treating schizophrenia. The complaint and settlement were in the Dauphin County Court of Common Pleas.