spiral matrix - fix a bug