Some minor change and bugfix