Fixes for 1ab5317578fce9ff7ff8c6b61c461d914c7b835b