fixed bugs with constant temp vars and newlines