Fixed several problems with r2b.