Bug fixes for linux version.