Modify switch-function
Update for 0.6.10