Safari event bug fix

Fix for https://github.com/x-tag/core/issues/24