fixed an bug introduced by the last pull request