minor tweaks, bug fix