correctly handling slot events