Remove empty variables, fix #244, fix #245