fixed a couple of problems based on question to mailing list