Fix to get the right root directory