Small modifications. Swapped %n and %N