debug and review CapValidator

several bugs fixed