major bug fixes in robot controller