fix build to handle dynamic scripts