Fixed bash if-blocks