Fixed NPE due to backward compatibility