Fixed several bugs for displaying images and links