fix some small errors in spikedb

Signed-off-by: Mattias Andrée <maandree@operamail.com>
fix some db error, one remaining

Signed-off-by: Mattias Andrée <maandree@operamail.com>