A few more checks; fix GCC bug