Fixed last change to this version with boolean check.