fixed ajax success callback so that the request is only fired once