solved a long outstanding bug