Attempts to fix segfaults caused by 90352ef