Use the correct layout parameters while constructing tags.