How to prevent script conflict?