fixes for spaces in file names
npe bug fix
generating predefined color fix