A few error fixes