Got db working
fixed empty hash crash