database snapshot and minor bugfix