fixed some issues with the input