Fixed issues for building without all modules enabled.