Fixed handling of notifications