Trim button rules