Fixed the layout issues

Fixes #194