merge master
fix conflicts
fixed middleware test with wrong tmpid