Fixed bug with sample script