FIX: if payments array is empty then this condition was not ok