ALWAYS add async:false in ajax calls :/