Fix bot bugs

(Thanks to Mario)