added handling for possible null pointer
fixes #7

added small buffer for activate distance