fixed profile link by adding conditional