Fixed issues with working directory