Fix bugs identified by softeam
Fix bug when mixing IaaS and PaaS