reordered script invocation, fixes #14