little better handling of function binding on ajax complete