Reindented the code for PR#581