Fix github #150 by adding a settings parameter