Fixed --disable bug (closes #2840)