fixed controller bugs
Merge pull request #7 from huip/master

fixed controller bugs