Fixed crash when going to details with empty db. Also button.