Seg fault was due to printf oversight.