I just did a few unit tests and I can confirm your bug.
I created a new branch for bugs https://github.com/jb68/zeroshell-ui/tree/bugfix
and uploaded a 2 lines change fix for this.
You can create a patch and apply it to sethttps script
You can also change every time both http and https port and should work.