added some fixes, minor changes