fix exception when no statements have been executed