Fix some edges case of spec failure