Fix master_ref