fixed some handling of the source directory