Prevent premature cleanup

Signed-off-by: Shahbaz Youssefi <ShabbyX@gmail.com>