fixed closed elements bug that caused weird scrolling issues