Using more robust way of checking arch