Fixed an error in variable.state causing previous styles not being overwritten in some cases