Revert 89a2593..52574a8

This rolls back to commit 89a259383e8f673b5bca52407908f7d5bfad3cd6.
Revert 52574a8..56e0593

This rolls back to commit 52574a88dc2328f42abab8aa47a5cd24ced3e334.
Revert 89a2593..aa076eb

This rolls back to commit 89a259383e8f673b5bca52407908f7d5bfad3cd6.
Revert 52574a8..88eebe0

This rolls back to commit 52574a88dc2328f42abab8aa47a5cd24ced3e334.
Revert 89a2593..26fe641

This rolls back to commit 89a259383e8f673b5bca52407908f7d5bfad3cd6.
Revert 52574a8..3ebb23f

This rolls back to commit 52574a88dc2328f42abab8aa47a5cd24ced3e334.
fix various crashes