Fix mongo input reader