fixed bot user conditionl bug and typo in function name