fixed error (object bgfdr not found)