fix bugs with bot script