pattern bugs solved