R4: Fix two small bugs