fixed a bug that fired global events even if it's set to off