Changed flag output to attributes in ptop case to conform with Tarun's changes from a few months ago.