fixed ajax post, added async:false