Fixed integer term problem. Removed head moving to body in rewriter.