Fix tests (patch by c0ff3m4kr)