Fixed loading without server and json timeout issue

Also added comments