made the sanitizer check cleaner, made test more robust

Signed-off-by: Naomi Novik <shalott@gmail.com>