Fixes some issues when launching CasperJS