fixed bugs.
Add getStyle function.