fix rotate issues

fix rotate issues
add demos