More bugfixes

Fixed last segfault, added tolower function to user input.