Fixed bug for toy example