Nested elseif statements not working with lastest update

I've made a couple of changes and uploaded a new version, please give it a try and let me know if it makes a difference: https://www.gpsoft.com.au/DScripts/download.asp?new=13.0.47