Fix event writing and warnings from spray