Fixed passing Ref as a boolean