Made a Gui function to apply changes.
Fixed a bug with applying changes.