fixed a bug in the new . filename code