Fixing bug in nested ifs/whiles