added wrapped ajax call to fix jQuery error handling