Fix for unclosed Scanner