finish fixing all bugs listed at [https://github.com/luke-gru/riml/issues/31]