Added null check
Added missing dependencies