Fixing some bugs on saving programs

The root program is not presented for the user