Removed 'hack' from previous commit and use proper solution with cwd