Fixed directory resolution problem