fixed issues #103, #104, #105