misc errors fixed