Fixes from Daian's CR