Fixed bug in sample
written loader