minor changes and bug-fixes