Temporary patch for #131. Need to look into this more.