added to avoid the null pointer exception