fix minor bugs and add loading images for buttons