fix gauss nested functions