Fix bugs

refs #2