Fixes related to scroll-to-bottom crash
Various crash related fixes