code cleanup to make it stable