Fix error with $pet kill, thanks to @rexim.