Bug Fix

- Changed the way database is accessed to prevent problems with the
asynchronous requests.