fix rotate and onclick bug