throw err bugfix