fixed bug in hadamark reported by @ajgpitch. Closes #257
Merge pull request #259 from jrjohansson/fix-hadamard-bug

fixed bug in hadamard reported by @ajgpitch