Updated code fixes