Fixed error handling in sandbox for pure BIFs
Fixed run of pure BIFs in sandbox