fix bad test routine