misc fixes
Merge pull request #1 from gyjchen/master

Fix setup to play nicely with Ubuntu 12 server