small bugfix, remove redundant code