fix for #381 squashed/cleaned.
Merge pull request #410 from crawljax/fix381cleaned

fix for #381 squashed and cleaned.