Make shortcode also available to ajax calls

Also fixed table name regression error