fixed some bugs in drawResult