Adding fixes to bot code