Fix bug with toggle not working

See #34