Added pcall checks