Fixed some problems with AJAX and share request logic