Some rwsem optimization