Some tweaks to previewContextActionTriggered() function.