Fix for n = 0 issue