fixed errors in creating new