bugfix and enhancement