Resources-saving fixes.