Now works with multiple instances on one page