Fixing bugs in build