fix some issues with input