Corrected errors in the implementation of Ostergard's