Fixed problem with variables and not inserting enough lines in YS