Fixed some type instabilities