bugfix and misc.