changes from pandora port 2.5.2.0 by TomB