Fixed an issue where timeout is treated as success in ajax