fixes to get script running