Changed functions that robot stops automatically.