#1 Fixed : Was throwing an error when database was empty