bug fix for jQuery success function array