Fixed prepare script