fix usage of pcall