Profit-taking erases gains, KSE-100 ends flat