Linux Script: Bug Fix