Fixed hangs on file select

Merged from Original Repetier Repo.