making it work in CocoonJS