fixed under/overflow problem - well at least it seams to