Fixed some bugs regarding types. refs #451