Fixed crash on empty latitude/longitude

Fixes #755