fix with signal trap