Fix teh bugs.
Merge pull request #1 from candera/master

Fix teh bugs.