better behaviour if position changes
Added error handling for browserify, resolves #19