added explicit 'is' check in 'unsub' method