Fix one byte off issue in database creation