Fixed issues #58 and #69

Hi,

there are two commits that you might like :
 * fd11dee fixes issue #58 
 * f34e226 fixes feature request #69 

feel free to ask any question or remark.

Thanks for your work.