fixed minor issue in legacy code