Now supports empty codes list!