Copied changes from main valo branch