Fixed a bug whereby the code text was not initially set