Removed useless if statement.
Fixed warning.