Fix issue with re-declaring variable