Bug fixes

$lte -> $lt

Better duplicate handling