added patches from Tootai