This should probably be done in the constructor.