Correcting the script and adding a missing column that came to my notice..