fixing  bug