some fixes and add loading spinner