Fixed a bug in setup