Fixes to the sample plugin