fixed integer division bug in init Rd, Rs