fixed code errors that must have snuck in during a merge