some cleanup to work with the JPF