Implemented the rotate function and fixed combination with panel