Sensex ends flat despite strong global cues, loses 1.3% for week