elif caused delete to be skipped. better type handling for peculiar platforms (ahem, mac)

--HG--
branch : noink