Applying patch provided by Kevin Hook, also tabs --> spaces