fixes whitespace rendering in events