fixed styles crash on error