Fix indentation (this whole function is messed up)