if statement fix for live or dev