fix problem when using shortcode directly