fix various issues from the merge