fix bug with empty style
fix bug with mixed up styles