fix gaussian func