fixed indentation error in try loop.