compatiable for old version
Merge pull request #187 from Unknwon/master

compatiable for old version