Move GPT workaround to main.sh