Recoded the GUI handler since it was weirdly missing.