Tests & fixes