Some fixes for windows and android

there are couple of oprimizations that i would like to add later