improve behaviour with garbage input