Various fixes

RIO-110