Adding timeout for afterAjax