fixed a bug on a bash if condition with wrong syntax