Fix bug with writing object of styles and add to tests
Update dist/ file