fixed error on windows and snow leopard