Fixed some bugs with the builder and controller