fixed errors from earlier changes