Fix wrong assignment of pixel hit value, part of #171