Fixed NPE in create method