Faulty test fixed, all functions pass