bugfixes to riot