fixing bugs , illegal instruction with clang/llvm + some more