fixed type in merge of #20 from original repo