Rule configuration is not working as expected