Fix bug in scoring function
Convolution function