fix abort, cleanup print stmt