wrong place to test if ucut have nothing to do (empty list)
use constant instead of its numeric value
wrong pointer used (will segfault if an error appears before env_apply call)