fixed problems when sourcing from different directories; corrected typo