fixed misc errors