fixed ajax requests handling