Avoid using toggle as a port switch and fix indentation