The markets reversed early gains following weak global trends and continued selling in mid and small caps on Monday. After rallying last week, markets have started consolidation phase.The BSE Sensex ended at 54,402.85, up 125.13 points or 0.23%. The Nifty was at 16,258.25, up 20.05 points or 0.12%.