- better errors
- some db error fix