fix #688, #644
fix #643, when element has no style attribute