Katy Perry: Singer wins legal battle