fixed possible null pointer exception on connection failures
update changelog
merge 'upstream/master' in order to fix nullpointer bug