fixed bug with onResourceTimeout