fixed error where configure was called before definition