fixed bugs with converting styles to strings