fixes for https://github.com/JuliaLang/julia/issues/7314