fix bug for the debug version