fixed a bug in createdb