Added support for multiple instances on one page