Attempt 2 to fix fatal bug