Final Fix to code