fixed vanilla js callback not triggering