Fixed: collapse if statements