fixed building bug and did some control work