Bugs/sidebar

Fixes #1028

And fixes little bugs on scan button