Fixed NPE error