Bugfixes and minor changes.
Minor changes