remove useless main block