fix wscripts and compile errors in miheap