Fix two bugs (but I think this a not a best solution I can have
Fix one more bugs when we have to use  funciton instead of simplifyLets