nan test for check_pos_definite, singular value test fix