Fix sample editing