Wordpress:自定义字段

I have posts with custom field(name: link; value: www.google.com) If I use on page with posts this construction:

<?php if( get_post_meta($post->ID, 'link', true) ) { ?>
<?php $link=get_post_meta($post->ID, 'link', true); ?>
<a href="http://<?php echo $link; ?>"><img src="image.png">
<?php } else {} ?>

I have fantom links in different places of page. What is wrong?