fixed issues where it would crash on less permissive archetectures