fix new item creation
add checks if database is empty