Adding debug statement and changing initialise call for render