Sensex and Nifty50 End Flat After Erasing Gains