Test code bug fix