fix pointer in test and add more checks to it