minor tweaks to make the newly merged code work