Fixed NPE in issue 274