hack fix to prevent npe