Bug fixes for Dos