Fix sample script problem