rw fixes numerous definitions