fix an issue in constructor with parameter