Fixed the only_if check as pointed out by @triplesek