improved handling of the shortcode