Improved apps detect and added app timeout