Revising resize function for sidebar

Closes #236