Add specs to cover #402, #403, #320