Made the script compatible with the new UI introduced on April 19, 2013.