Fixes JavaScript error for certain style names