fixed various bugs

Works well with ST-8XE now.
Will crash if rtdServer is not running.