fixed fsel code