Some critical, major and minor fixes