fixing only_if block