fix option passing to rex