fix #106
close #107
add tests for #107
Merge branch 'master' of https://github.com/JuliaOpt/JuMP.jl