Apply new fixes (Thanks to Emil)
Apply new fixes