Fixes bug sending event information to database.