Fixed NPE when nothing is in focus.