Fixed bug when comet through IFrame not working properly

Fixed bug when comet through IFrame not working properly(e.g. throws exception in browser console, like "m" not found)