Bug fixes for windows 8