Fixing def ifs