Fixed some small bugs associated with the new top module