This fixes #2 and also resolve #3.