fixed errors from previous version