update styles for compact mode
fix event order