Input string fix

I've made this branch to address bug #11