Some fixes in rec script.