Changed check for loadPath