Fixes to ajax, multiple callbacks