Fixed nil bug in example