gave up trying to fix it myself and pulled scavs latest code instead