fixing but in script