added a try for homebutton + minor changes