'Database Clear' added, minor changes
Fixed failure on empty data