A couple of bug fixes

@HowardHinnant @nbougalis