better javascript engine logic
fix travis path problem