Remove empty variables, fix #241, fix #242