Duplicate db init

This fixes the bug that @zenhack pointed out