Fixed variables not appearing when code replaced.