Fix issue in live mode
Add mainResource dependency