Fix key binding errors

Error in rpt about non-bool expression fixed.
humanity rpt error fix

made some modifications to humanity add/remove to remove unneeded code
and fix rpt error of undefined variable.