Fixed createTableIfNotExist method