Bug fixes, minor changes.
fix conflicts