Bug fix on related post items error when no media is found and minor cosmetic fixes