Thanks I had tab indentation turned on instead of space, so indentation was inconsistent. I did tab-> space conversion on the whole file