Moved workaround code slightly.