Fixes javascript incompatibility with embed