improve bad attribute pattern