Fixed bug with database external communication not working correctly