Correct logic and spacing