fixed error in viewProfile