Fixed corner cases for configure script