Fixed condition and missing dir in RS