Added creating blanks if empty to error checking code.