fixed a bug where clear operation did not clean up data buffer before,
so resposive selection failed