fix a bug in rule handling when screen is set