Fixed some problems in robot