fix TypeError in createdb