Changes for new battd thanks to Quarx