Fix ufuncs support and tests