fix bug in drawSubGraph