Fixed a few remaining bugs related to reload and input focus

Woops, I had not tested with AJAX reloading, sorry /o\