Fixed bug in pdf rule