fixes to work in rebs