some cleanup to get things working