Fixes bug in gaussian