Corrected dedent handling
Improved indentation handling