fix error with locals in partial