Fixed missing condition in sandbox method