Put as statement back to fix exception handling