Update main.lua

Attempt to fix a bug