Fixed the empty pdf bug by adding the scripts