fix JS clone function

incorrect clone of Array
add callback to onCheckRequestStatus