Remove unnecessary if statement

Just a fix to improve the code