Fixed bug in reference generation for ps format.