Fix corner case when n = 0