Fix bug for cross-comiling