pdf bug fix. getprofile() was not working