bug fixes for tthe official 1.0 version