fixes issue when opening errors