Fixing the logic in assert_styles to better