Fixed some small bugs in the tool panel