added if statement

Signed-off-by: bovitobo <bovitobo@yahoo.com>