Fix logic issue in RestParameter