fix wrong subroutine
fix predata usage
Merge pull request #279 from teharrison/develop

fix wrong subroutine