Minor bug fixes, layout fix