sed command and minor bot changes