Fix for #98

@jplehmann @rbrito
Finally succeeded with fixing this bug and using only 1 Commit. 
See #100 for previous discussion.