ruby crash is due to threads. Restore other changes