fixed a bug with empty smpt_events