fixing bus error