fixed bugs from master merge

@rmethlie I hope I didn’t step on your toes. I’ve been using this to
debug and really needed the clear button