corrected ref_clk selection