Defensive check for line info

Fixes #45
Fixed #46