fixes saving errors