fixing switch bug: replaced right by left

This solves #6 issue

R? @lodr