Iss11

Should fix issue #11. Please test it before merging.