Jennifer Lopez debuted her brand new single "Ain't Your Mama" at the American Idol finale last week, but she's started to get some backlash already. Not because of the song's contents, but because of its production credits: the track was produced by Dr. Luke. Luke is currently embroiled in controversy after his signee Kesha brought a lawsuit against him alleging he had drugged, raped, and abused her. Since then, artists like Kelly Clarkson and Lady GaGa have spoken out against him, and many stars are now refusing to work with him. His label Kemosabe Records is also currently going through a round of layoffs, although spokespeople for the company insist it has nothing to do with the lawsuit.

Thus, when it was revealed that J-Lo's track carried production credits from Luke, some fans were not happy and spoke out online. ​Now, the song's co-writer Meghan Trainor is speaking out in defense of the singer to Digital Spy. "[It was] not fair on her, not at all," she said of the backlash. "I texted her the song and she had no idea - she thought I did it alone by myself at my house, which a lot of people think because I do do that." Trainor claims that she loved the song right away, and cut a recording of it almost immediately.

This would explain how she recorded the song without knowing who it was produced by originally, but it still seems unlikely that she never found out before its ultimate release. Nonetheless, Trainor isn't here for the criticisms, and says she "felt terrible when Jennifer got all the hate for ['Ain't Your Mama'], and it's just all ridiculous. It's such a big song for her." Lopez, Trainor, and Dr. Luke are all signed under the Sony umbrella, which makes their work together make more sense. It could even be chalked up to demands from label execs, although none of the artists have said that outright.

For her part, J-Lo has stayed silent about the controversy. You can check out her American Idol performance below.