Fix sign bug reported by Paweł Sikora.