fixed some Linux bugs