fixed getprofile
cleanup