fix small bugs
Merge branch 'dev' of https://github.com/yupe/yupe into dev
#1281
#1281
#1281
closed #1278
started #1220
fix tests