added failing nan test for check_unit_vector
fixed check_unit_vector