Prevent JS error when canceling load from URL

Fixes #26