Added isOnline() check, app no longer crashes when no internet connection