- fixed compiler errors
- fixed 64bit issues