fix to #111, removed redundant code.