fixed bugs in setup ctrl