This could probably use a comment why it's checking whether the handle is active.