Fixing while snippet