Multihreading implemented, still fails