Fixed Database issues with multiple entries