minor adjustments, bug fixes