Fix test and added additional function checking