made reverse ref generation optional

This is fix for the #1768 issue