Fixed the issue related to database locks by simply changing one line of code.
Really? :/