quick fix to avoid nil pointer exception