Fixed issue for dynamic database shifting