small bug fixes and general loadingHandler