Fix two critical errors