change isdebug to isfigure