Fix sidebar resizing and two minor bugs