[Controller] Debug and fix some bugs