Fix sidebar transition (fixes #1653)