Closes #3281 and #3283

Closes https://github.com/JuliaLang/julia/pull/3281 and https://github.com/JuliaLang/julia/issues/3283

Sorry about the multiple open pull requests, I am yet to get the complete hang of using git in this project here.