Fixed some small bugs with codexlayout for Firefox