fix bug introduced while removing printout statements