Made closing the database thread-safe
Bumped version to 1.2.1