Fix layout_width is parsed incorrectly

FIXED #32
This is a solution that is similar to #42. But this solution is more complete.