bugfix for ticket 574

- the unfortunate check at line 69 caused coefficient swallow, fixed now.
- At line 179 `modp` was called incorrectly

open: how to check result correctness?